import note.TextAndImageNote;
import note.TextNote;
import store.NoteStore;

public class Launcher {
    public static void displayTextNotes(NoteStore store) {
        int count = 0;
        for (TextNote note : store.getAllTextNotes()) {
            count++;
            System.out.println("Text Note " + count + ": " + note.toString());
        }
    }

    public static void displayTextAndImageNotes(NoteStore store) {
        int count = 0;
        for (TextAndImageNote note : store.getAllTextAndImageNotes()) {
            count++;
            System.out.println("Text and Image Note " + count + ": " + note.toString());
        }
    }

    public static void main(String[] args) throws Exception {
        NoteStore store = new NoteStore();

        // add notes to store
        try {
            store.storeNote(
                    "Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems");
            store.storeNote("Few books to read - Ikigai, How to win friends and influence people");

            store.storeNote("The shopping list on my fridge", "//foo/bar1/bar2/imgset1.jpg");
            store.storeNote("The size label of Jack's shirt", "//foo/bar1/bar2/imgset2.jpg");
        } catch (Exception e) {
            throw e;
        }

        // display notes by category
        displayTextNotes(store);
        System.out.println();
        displayTextAndImageNotes(store);
    }
}
